<?php

use Doraemon\tools\Curl;
use Doraemon\tools\HhzEnv;
/**
 * @deprecated
 */
class OrderAction extends QueueActionPlugin
{
    const WECHAT_NOTICE_URL = 'http://mod-wxmessage.haohaozhu.me/sendMessage.php';
    const NOTICE_AGENT_ID = '1000015';
    const NOTICE_TO_PARTY = '34';

    public function main()
    {
        if (HhzEnv::isProduction()) {
            $content = $this->getRequest()->getPost("content");
            $param = [
                'toparty' => self::NOTICE_TO_PARTY,
                'content' => $content,
                'agentid' => self::NOTICE_AGENT_ID,
            ];
            Curl::Request('post', self::WECHAT_NOTICE_URL, ['form_params' => $param]);
        }
        $this->setSuccess();
    }
}